- filter on a specific token
- filter on a specific token pair
- filter on a specific address
- filter on a specific date range
- filter on a specific category
- etc.
- choose the spot in your Query where you want to implement a parameter
- click on the add parameter button or type
{{example_parameter_name}}
- open the parameter options
- configure your parameter’s name, type, and default value
Parameters in Query Views
Parameters can also be used in Query Views, allowing you to pass parameters several levels deep into nested queries. This powerful feature enables you to create complex, reusable query architectures where parameters flow through multiple layers of queries. For example, you can create a base query with parameters, then use that query as a view in another query while passing different parameter values. This allows for modular query design and enables sophisticated dashboard architectures. See the Query Views documentation for detailed examples and syntax.Freeform parameters
Freeform parameters are useful if you want your users to be able to input any text, number or date value. An example of this would be a parameter that allows users to input an address, a token, or a date.The system will automatically detect the type of the value and insert it into the query as the correct type. You can also manually adjust the type within the query by using the
cast
function.

List parameters
List parameters are useful if you want your users to be able to choose one or multiple values from a pre-defined list of values. This list can be manually defined or populated from a different query. Examples of this include parameters that allows users to choose from a list of tokens or a list of token pairs.
unnest
and split
functions to turn the columns into useable values.
By default, the values will be inserted into the query as individual columns.
Example:A list of 3 selected values in a parameter called
example_parameter_name
will be inserted into the query like this:
where in
clause. To do this, you need to use the unnest
and split
functions to turn the columns into useable values.
For example:
Manual list
When you manually define a list of values, the list can be text values, numbers, dates or even varbinary values. The system attemtps to detect the type of the list values, but sometimes you might have to manually adjust the type within the query by using thecast
function.
A very common example of using a manual list is setting the “time granularity” of a dashboard/query.
List from query results
You can use the results of a query as the list of values for a parameter. Doing this allows you to build dynamic dashboards that allow users to choose from a list of values that is populated by a different query. You can choose any query by its query_id and any column by its name. The column data type will be transferred to the parameter.
Query resultsThe query that you use to populate the list of values does not update automatically. You need to trigger a refresh of the query results to update the list of values. This can happen by either manually refreshing the query results or by setting up a query schedule.
- to choose from a list of tokens
- to choose from a list of token pairs
- to choose from a list of addresses or labels
- to single out specific products or categories
Parameters in query descriptions
You can use parameters in the description of a query. This feature is useful to effortlessly report on the current value of a parameter. For example, you can use this to report on the current value of a parameter that is used in a dashboard. To use a parameter in a query description:- open your query settings
- add the parameter to the query description by using the
{{example_parameter_name}}
syntax - save your query settings
- your query description will now show the current value of the parameter
Parameters in dashboards
If you want to use the same parameter between different queries on a dashboard, make sure to use exactly the same settings for the parameter in each query. The parameter will then be shared between the queries and only turn up once in the dashboard’s parameter menu. Exactly the same settings means:- the parameter name is the same
- the parameter type is the same
- the parameter default value is the same
- the parameter list of values is the same
- the query id and column name for a list of values from a query is the same